<?php

use Biz\service\FineGoodsBrokeNews\FineGoodsBrokeNewsFavouriteLogService;
use Biz\service\FineGoodsBrokeNews\FineGoodsBrokeNewsService;


/**
 * @deprecated
 */
class FavouriteAction extends ActionPlugin
{
    const USER_LEVEL = self::LEVEL_NOTHING;

    public function main()
    {
        $basicID = $this->getRequest()->getQuery('basic_id', 0);
        $type = (int)$this->getRequest()->getQuery('type', FineGoodsBrokeNewsFavouriteLogService::TYPE_INCREASE);
        $rs = FineGoodsBrokeNewsFavouriteLogService::calculateFavCount($basicID, $type);
        $this->setSuccess(['list' => $rs]);
    }
}